package factory.ab;

import factory.Restaurant;

/**
 * @author: 任福祥
 * * @create: 2024-02-22 09:48
 */
public class Main {
    //工厂方法模式
    public static void main(String[] args) {
        Restaurant duck = new DuckFactory().createRestaurant();
        duck.cook();
        Restaurant fish = new FishFactory().createRestaurant();
        fish.cook();
    }
}